package syn.service;

import syn.dao.StudentDao;
import syn.entity.Student;

import java.util.List;

/**
 * Created by Administrator on 2018\3\4 0004.
 */
public class StudentServiceImpl implements StudentService {
    private StudentDao dao;

    public void setDao(StudentDao dao) {
        this.dao = dao;
    }

    public int addStudent(Student student) {
        return dao.addStudent(student);
    }

    public int updateStudent(Student student) {
        return dao.updateStudent(student);
    }

    public int deleteStudent(int id) {
        return dao.deleteStudent(id);
    }

    public List queryStudents() {
        return dao.queryStudents();
    }
    public void transferAccounts(int outId, int inId, Double money) {
        dao.outMoney(outId,money);
        int a=1/0;
        dao.inMoney(inId,money);
    }
}
